package org.example.springboot.service;


import org.example.springboot.common.page.PageResult;
import org.example.springboot.common.service.BaseService;
import org.example.springboot.entity.ColDevice;
import org.example.springboot.entity.ColDeviceDataSet;
import org.example.springboot.entity.IrrigationUnit;
import org.example.springboot.query.IrrigationUnitQuery;
import org.example.springboot.vo.IrrigationUnitVO;

import java.util.List;

/**
 * 
 *
 * @author Fz
 * @since 1.0.0 2024-07-31
 */
public interface IrrigationUnitService extends BaseService<IrrigationUnit> {

    PageResult<IrrigationUnitVO> page(IrrigationUnitQuery query);

    void delete(Long id);

    void doSave(IrrigationUnitVO vo);

    List<ColDevice> queryDevicesByUserId(Long userId, Integer devType);

    List<ColDeviceDataSet> queryDeviceValueByNo(Long no);

    void checkDevice();

    boolean checkItExists(String unitCode);

    void updateWaterVolumeInfo(IrrigationUnitVO vo);

    IrrigationUnitVO getIrrigationUnitById(Long id);

    void decisionCallbacks(IrrigationUnitVO vo);

    void setETCheck(String controlDevice);

    void setCycleCheck(String controlDevice,String cycle);

    void delTaskByJobId(String controlDevice);

    void upCycleCron();

}